package com.dragon.modules.yuegou.client.wechat_mini.client.impl;

import com.dragon.modules.yuegou.client.wechat_mini.client.AuthClient;
import com.dragon.modules.yuegou.client.wechat_mini.client.LiveClient;
import com.dragon.modules.yuegou.client.wechat_mini.client.MiniClient;
import com.dragon.modules.yuegou.client.wechat_mini.client.SecurityClient;
import com.dragon.modules.yuegou.client.wechat_mini.client.SubscribeMessageClient;
import com.dragon.modules.yuegou.client.wechat_mini.client.WxaCodeClient;
import com.dragon.modules.yuegou.client.wechat_mini.conn.ApacheMiniClient;
import com.dragon.modules.yuegou.client.wechat_mini.conn.IMiniClient;

public class MiniClientImpl implements MiniClient {

	private final AuthClient auth;
	private final SubscribeMessageClient subscribeMessage;
	private final WxaCodeClient wxaCodeClient;
	private final SecurityClient securityClient;
	private final LiveClient liveClient;

	public MiniClientImpl() {
		this(new ApacheMiniClient());
	}

	public MiniClientImpl(IMiniClient client) {
		this.auth = new AuthClientImpl(client);
		this.subscribeMessage = new SubscribeMessageClientImpl(client);
		this.wxaCodeClient = new WxaCodeClientImpl(client);
		this.securityClient = new SecurityClientImpl(client);
		this.liveClient = new LiveClientImpl(client);
	}

	@Override
	public AuthClient auth() {
		return auth;
	}

	@Override
	public SubscribeMessageClient subscribeMessage() {
		return subscribeMessage;
	}

	@Override
	public WxaCodeClient wxaCode() {
		return wxaCodeClient;
	}

	@Override
	public SecurityClient security() {
		return securityClient;
	}

	@Override
	public LiveClient live() {
		return liveClient;
	}
}
